//package com.jzo2o.foundations.handler;
//
//import com.jzo2o.foundations.constants.RedisConstants;
//import com.jzo2o.foundations.service.IRegionService;
//import com.jzo2o.foundations.service.IServeService;
//import com.xxl.job.core.handler.annotation.XxlJob;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.data.redis.core.RedisTemplate;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.Resource;
//
///**
// * springCache缓存同步任务
// *
// * @author itcast
// * @create 2023/8/15 18:14
// **/
//@Slf4j
//@Component
//public class SpringCacheSyncHandler {
//
//    @Resource
//    private IRegionService regionService;
//    @Resource
//    private RedisTemplate redisTemplate;
//
//    /**
//     * 已启用区域缓存更新
//     * 每日凌晨1点执行
//     */
//    @XxlJob(value = "activeRegionCacheSync")
//    public void activeRegionCacheSync() {
//        log.info(">>>>>>>>开始进行缓存同步，更新已启用区域");
//        //1.清理缓存
//        String key = RedisConstants.CacheName.JZ_CACHE + "::ACTIVE_REGIONS";
//        redisTemplate.delete(key);
//
//        //2.刷新缓存
//        regionService.queryActiveRegionListCache();
//        log.info(">>>>>>>>更新已启用区域完成");
//    }
//
//}